package com.tedu._06weibo.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

@Data
public class UserLoginDTO {
    @ApiModelProperty(value = "用户名", required = true, example = "张三")
    @NotBlank(message = "用户名不能为空")
    @Size(max = 20, min = 1, message = "用户名长度在1-20之间")
    @Pattern(regexp = "[\\u4e00-\\u9fa5a-zA-Z0-9]{1,20}",message = "用户名只能是汉字、字母、数字")
    private String username;
    @ApiModelProperty(value = "密码", required = true, example = "123456")
    private String password;
}
